<%= render :partial =>'/store/toolbar'%>
<div id="content_container">
<div id="hot_container">
  <div class="title">
    <span class='title_content'>背景列表</span>
  </div>
  <div class="action_link">
    <%= link_to '添加背景', new_background_path,:class=>"action_add",:style=>"float:right;" %>
  </div>
  <table class="admin"  cellpadding="0" cellspacing="0" >
    <thead>
    <th>编号</th>
    <th>名称</th>
    <th>缩略图</th>
    <th colspan="2">操作</th>
    </thead>
    <% for background in @backgrounds %>
      <tr>
        <td><%= background.id%></td>
        <td><%= background.name %></td>
        <td><%= image_tag url_for_file_column background, 'image_url' ,'thumb'%> </td>
        <% if editor? %>
          <td><%= link_to '编辑', edit_background_path(background) %></td>
          <td><%= link_to '删除', background, :confirm => 'Are you sure?', :method => :delete %></td>
        <% end %>
      </tr>
    <% end %>
  </table>
  <div id="pager">
    <%= will_paginate @backgrounds,:prev_label => '«上一页',:next_label => '下一页»' %>
  </div>
</div>

<div class="action_link">
  <%= link_to '取消', '/store/mine',:class=>'action_back' %>
</div>
</div>
